package com.luoxiang.socialandroid.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.TextView;

import com.luoxiang.socialandroid.R;
import com.luoxiang.socialandroid.base.BaseActivity;

public class WebloadActivity extends BaseActivity {
    private TextView tv_title;
    private WebView wb_agree;
    private ImageView icon_back;

    @Override
    protected void initListener() {
        icon_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
    }

    @Override
    protected void initLayout(Bundle savedInstanceState) {
        setContentView(R.layout.activity_webload);
    }

    @Override
    protected void initView() {
        tv_title = findViewById(R.id.tv_title);
        wb_agree = findViewById(R.id.wb_agree);
        icon_back = findViewById(R.id.icon_back);
        Intent intent = getIntent();
        String title = intent.getStringExtra("title");
        String webUrl = intent.getStringExtra("webUrl");
        tv_title.setText(title);
        wb_agree.loadUrl(webUrl);
    }
}